
#include "iostream"
#include "vector"
#include "unordered_map"
#include "algorithm"
#include "string"
#include "list"
#include "string.h"


class Solution{
public:

    int li=0;
    int wang=0;
    int zhang=0;
    int wrong=0;
    void run(){
        for(int i=0;i<10;i++){
            std::string s;
            std::getline(std::cin,s);
            if(s=="li"){
                li++;
            }else if(s=="wang"){
                wang++;
            }else if(s=="zhang"){
                zhang++;
            }else{
                wrong++;
            }
        }
        printf("li:%d\n",li);
        printf("zhang:%d\n",zhang);
        printf("wang:%d\n",wang);
        printf("Wrong election:%d\n",wrong);
    }
};

int main() {
//    bool cur_num= true;
Solution().run();
    return 0;
}

